<?php
/**
 * Created by PhpStorm.
 * User: cen
 * Date: 2020/6/29
 * Time: 21:25
 */

namespace app\index;


use think\App;
use think\Controller;
use app\admin\model\ImageModel;

class BaseController extends Controller
{

    public function __construct(App $app = null)
    {
        parent::__construct($app);

        $this->init();
    }

    public function init()
    {
        $res = ImageModel::where('type',2)->find();

        $url = $res == null? '' : $res->img_path;

        $this->assign('bannerImgUrl',$url);


    }
}